<template>
  <el-form
    inline
    style="margin-top: 15px"
    @submit.native.prevent="handleSearch"
  >
    <el-form-item>
      <el-input v-model="query">
        <el-button
          slot="append"
          icon="el-icon-search"
          @click="handleSearch"
        ></el-button>
      </el-input>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="handleDialog">添加用户</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
export default {
  data() {
    return {
      query: "",
    };
  },
  methods: {
    handleSearch() {
      this.$emit("handleSearch", this.query);
    },
    handleDialog() {
      this.$emit("handleDialog");
    },
  },
};
</script>
<style></style>
